<?php

/**
 *  Description of Uploads
 *
 * @author LJ <jun.lu.726@gmail.com>
 * @copyright 2012-2013 shangbox.com
 * $Id: Uploads.php 162 2012-11-09 04:04:30Z Jun.Lu.726@gmail.com $
 * @history    2012-10-22  17:07:01::  Lujun  ::  Create File
 */
class Model_Uploads extends Model_AbstractDao
{

    protected $_dbName     = 'BingoMobi';
    protected $_tableName  = 'bg_sys_uploads_file_log';
    protected $_primaryKey = 'id';
    protected $_nameField  = '';

    /**
     * 更新存入LOG中的状态，确定上传的文件已经被使用或清理
     *
     * @param string $savePath
     * @param int $state 0未存库，1回调确认存库,2为请理
     * @return bool
     */
    public function updateFileType($savePath, $state = 1)
    {
        return $this->update(array('state' => $state), array('file_path' => addslashes($savePath)));
    }

}
